package com.water.studymoduldemo.service;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

public class RedisServicelmp implements RedisService{

    JedisPool jedisPool = new JedisPool();

    @Override
    public void set(String key, String obj) {
        Jedis client = new Jedis("127.0.0.1");
        client.set(key,obj.toString());
    }

    public static void main(String[] args) {
        RedisService redisService = new RedisServicelmp();
        try {
            for (int i = 0; i < 300000; i++) {
                redisService.set("iii"+i,i+"");
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
